package aor2;

import aor2.cpu.InternBus;
import aor2.cpu.blockcontrol.MicroInstruction;
import aor2.cpu.blockcontrol.horizontal.MMHorizontalType2;
import aor2.cpu.blockinterface.InterfaceBlock;
import aor2.cpu.blockoperation.AlushiftXYM1;
import aor2.cpu.blockregisters.GPRegisters;
import aor2.cpu.blockregisters.InstructionRegister;
import aor2.cpu.blockregisters.InstructionSignal;

public class TestClass2 {

	static void info() {
		System.out.println("==========================");
		System.out.println(InternBus.info());
		System.out.println(InstructionSignal.info());
		System.out.println(InstructionRegister.info());
		System.out.println(GPRegisters.info());
		System.out.println(InterfaceBlock.getInstance());
		System.out.println(AlushiftXYM1.getInstance());
		System.out.println("==========================");
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		MMHorizontalType2 uMem = MMHorizontalType2.getInstance();
		MicroInstruction uInstr;
		System.out.println("begin");
		info();
		for (long step = 0; step < 250; step++) {
			uInstr = uMem.getMicroInstruction(step);
			uInstr.start();
			System.out.println(uInstr);
			info();
			uInstr.updateStates();
		}
		System.out.println("end");
		info();
	}

}
